// orderStatus.ts

export enum OrderStatus {
  NewOrder = 10,
  PendingMachineReview = 20,
  MachineReviewRejected = 30,
  PendingContractSigning = 35,
  PendingApproval = 40,
  ApprovalRejected = 50,
  ApprovalPassed = 60,
  UserCancelled = 70,
  FunderConfirmed = 75,
  FailedAuction = 78,
  LoanProcessing = 80,
  PendingReLoan = 85,
  LoanSuccess = 90,
  LoanFailed = 100,
  NormalRepayment = 110,
  ExtensionProcessing = 115,
  Overdue = 120,
  EarlyRepaymentProcessing = 130,
  Settled = 140,
  EarlySettlement = 150,
  OverdueSettlement = 160
}

export const orderStatusDescriptions: Record<OrderStatus, string> = {
  [OrderStatus.NewOrder]: '新订单',
  [OrderStatus.PendingMachineReview]: '待机审',
  [OrderStatus.MachineReviewRejected]: '机审拒绝',
  [OrderStatus.PendingContractSigning]: '待签合同',
  [OrderStatus.PendingApproval]: '待审批',
  [OrderStatus.ApprovalRejected]: '审批拒绝',
  [OrderStatus.ApprovalPassed]: '审批通过',
  [OrderStatus.UserCancelled]: '用户取消',
  [OrderStatus.FunderConfirmed]: '资方确认',
  [OrderStatus.FailedAuction]: '流标',
  [OrderStatus.LoanProcessing]: '放款处理中',
  [OrderStatus.PendingReLoan]: '待重新放款',
  [OrderStatus.LoanSuccess]: '放款成功',
  [OrderStatus.LoanFailed]: '放款失败',
  [OrderStatus.NormalRepayment]: '正常还款中',
  [OrderStatus.ExtensionProcessing]: '展期处理中',
  [OrderStatus.Overdue]: '逾期',
  [OrderStatus.EarlyRepaymentProcessing]: '提前还款处理中',
  [OrderStatus.Settled]: '结清',
  [OrderStatus.EarlySettlement]: '提前结清',
  [OrderStatus.OverdueSettlement]: '逾期结清'
}
